package router

import (
	"api-gateway/basic/config"
	"api-gateway/handler/api"
	"api-gateway/midderware"
	"github.com/gin-gonic/gin"
)

func GoodsRouter(v1 *gin.RouterGroup) {
	goods := v1.Group("/goods")
	{
		goods.GET("/goodsDetail", api.GoodsDetail)                //商品详情
		goods.GET("/shopDetail", api.ShopDetail)                  //店铺详情
		goods.GET("/goodsPush", api.GoodsPush)                    //商品推荐
		goods.GET("/commentFind", api.CommentFind)                //评论展示
		goods.Use(midderware.JWTAuth(config.KEY_JWT))             //中间件
		goods.POST("/productCommentsAdd", api.ProductCommentsAdd) //一级评论添加
		goods.POST("/commentReplyAdd", api.CommentReplyAdd)       //二级评论添加
		goods.POST("/popUpAd", api.PopUpAd)                       //弹窗广告
	}
}
